import { Drawer as AntDrawer } from 'antd'
import type { DrawerProps } from 'antd'
import styles from './index.module.less'

export const BeautyDrawer = ({
  className = '',
  width = 447,
  children,
  style,
  closable = false,
  ...restProps
}: DrawerProps) => {
  return (
    <AntDrawer
      rootClassName={`${styles['drawer-container']} ${className}`}
      width={width}
      closable={closable}
      forceRender={false}
      destroyOnClose
      zIndex={1001}
      {...restProps}
    >
      {children}
    </AntDrawer>
  )
}
